<template>
    <view>
        <web-view :src="url" @message="handleMessage" update-title="false"></web-view>
    </view>
</template>

<script setup>
import { reactive, ref, getCurrentInstance } from "vue";
import { onReady, onLoad, onShow } from '@dcloudio/uni-app'
const url = ref(null)
const { proxy } = getCurrentInstance()
onLoad(() => {
    const eventChannel = proxy.getOpenerEventChannel();
    eventChannel.on('setUrl', function (data) {
        console.log(data)
        url.value = data
    })
})
const handleMessage=(val)=>{
    console.log(val);
}
</script>